package com.ang.enums.t1;

/**
 * 枚举类
 * 每个属性都是当前枚举类型
 * 属性相当于类对象，可以调用枚举类方法
 */
public class SexEnum1Test {
    public static void main(String[] args) {
        SexEnum1 sex = SexEnum1.FEMALE;
        print(sex);
        isMan(sex);
    }


    public static void print(SexEnum1 sex){
        switch (sex){
            case MALE:
                System.out.println("男性");
                break;
            case FEMALE:
                System.out.println("女性");
                break;
            default:
                System.out.println("未知");
        }
    }

     public static void isMan(SexEnum1 sex){
         boolean man = sex.isMan();
         System.out.println(man);
     }
}
